import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';

import './permission'; // permission control
import './assets/icons'; // icon

import '@/assets/styles/index.scss'; // global css

import Vant from 'vant';
import 'vant/lib/index.css';
import Element from 'element-ui';
import './assets/styles/element-variables.scss';

// echarts图表
import * as echarts from 'echarts';
import eChartsOption from '@/components/Chart/index.js';

// 全局方法挂载
Vue.prototype.$echarts = echarts;
Vue.prototype.$eChartsOption = eChartsOption;

// Chart图表组件
import Chart from '@/components/Chart/index.vue';
import SuspendBall from '@/components/SuspendBall/index.vue';

// 全局组件挂载
Vue.component('Chart', Chart);
Vue.component('SuspendBall', SuspendBall);

Vue.use(Vant);
Vue.use(Element);

Vue.config.productionTip = false;

new Vue({
  el: '#app',
  router,
  store,
  render: (h) => h(App),
});
